package tiandang.core.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tiandang.core.dao.AdminMapper;
import tiandang.core.model.Admin;
import tiandang.core.service.AdminService;

@Service
public class AdminServiceImpl implements AdminService {

  @Autowired
  private AdminMapper adminMapper;

  @Override
  public Integer countAdmin() {
    return adminMapper.countAdmin();
  }

  @Override
  public Admin findAdminByUsername(String username) {
    return adminMapper.findAdminByUsername(username);
  }

  @Override
  public void updatePassword(Admin admin) {
    adminMapper.updatePassword(admin);
  }

  @Override
  public void insert(Admin admin) {
    adminMapper.insert(admin);
  }
}
